package com.service.impl;

import com.dao.TestStudentMapper;
import com.entity.TestStudent;
import com.service.TestStudentService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

/**
 * Project: tobe-better-coder
 * Package: com.service.impl
 *
 * @author : Mr.xu
 * @date : 2023/9/25 21:30
 */
@Service("testStudentService")
public class TestStudentServiceImpl implements TestStudentService {

    @Resource
    private TestStudentMapper testStudentMapper;

    @Override
    public TestStudent queryBuId(TestStudent testStudent) {
        return testStudentMapper.queryById(testStudent);
    }

    @Transactional(propagation = Propagation.SUPPORTS)
    @Override
    public int updateById(TestStudent testStudent) {
        int result = testStudentMapper.updateById(testStudent);
        return result;
    }


}